package COM.ZYC05;

public class Student  extends Person{
  double scoreEn;
  double scoreMath;
  double scoreCh;
  public double aver(){
      return (scoreCh+scoreMath+scoreEn)/3;
  }//成绩平均分
    public double max(){
      return Math.max(Math.max(scoreCh,scoreMath),scoreEn);
    }
    public double min(){
      return Math.min(Math.min(scoreCh,scoreMath) ,scoreEn);
    }
    public String toString() {
      return "学生" + '\t' +
              "姓名" + name + '\t' +
              ", 性别" + sex + '\t' +
              ", 年龄" + age + '\t' +
              ", 英语成绩" + scoreEn + '\t' +
              ", 数学成绩" + scoreMath + '\t' +
              ", 语文成绩" + scoreCh + '\t' +
              ", 平均成绩" + aver() + '\t' +
              ", 最高分" + max() +'\t' ;
    }

}
